<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsImgsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::HasTable('goods_imgs')){
            Schema::create('goods_imgs', function (Blueprint $table) {
                $table->increments('id');
                $table->integer('goods_id')->comments('商品id');
                $table->string('path')->comments('图片路径');
                $table->timestamps();
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::drop('goods_imgs');
    }
}
